#include"vector.hpp"
void test1()
{
    hcc::vector<int> l;
    cout<<l.size()<<endl;
    cout<<l.capacity()<<endl;
    l.push_back(1);
    l.push_back(2);
    l.push_back(3);
    cout<<l.size()<<endl;
    cout<<l.capacity()<<endl;
    l.push_back(4);
    cout<<l.size()<<endl;
    cout<<l.capacity()<<endl;
    l.push_back(5);
    l.push_back(6);
    l.push_back(7);
    l.push_back(8);
    l.push_back(9);
    cout<<l.size()<<endl;
    cout<<l.capacity()<<endl;
    for(const auto& e : l)
        cout<<e<<"->";
    cout<<endl;
    cout<<l.size()<<endl;
    cout<<l.capacity()<<endl;
}
void test2()
{
    hcc::vector<int> l;
    l.push_back(1);
    l.push_back(2);
    l.push_back(3);
    l.push_back(4);
    l.push_back(5);
    hcc::vector<int> s=l;
   // s=l;
    for(const auto& e : s)
    {
        cout<<e<<"->";
    }
    cout<<endl;
}
void test7()
{
	class Solution {
	public:
		void generate(int numRows)
		{
			hcc::vector<hcc::vector<int>> vv;
			size_t i = 0;
			size_t j = 0;
			vv.resize(numRows);
			for (i = 0; i < vv.size(); i++)
			{
				vv[i].resize(i + 1);
				vv[i].front() = vv[i].back() = 1;
			}
			for (i = 2; i < vv.size(); i++)
			{
				for (j = 1; j < vv[i - 1].size(); j++)
				{
					vv[i][j] = vv[i - 1][j - 1] + vv[i - 1][j];
				}
			}
			for (i = 0; i < vv.size(); i++)
			{
				for (j = 0; j < vv[i].size(); j++)
				{
					cout << vv[i][j] << "->";
				}
				cout << endl;
			}
		}
	};
	Solution().generate(5);
}
int main()
{
    //test1();
   // test2();
   test7();
    return 0;
}
